#include "fat32.h"
#include "ext2.h"
#include "ourhdr.h"



int main(int argc, char** argv){
	if(argc!=2)
		err_quit("usage: test_fat32 <device-name>");
	initialise_fat32(argv[1]);

	/* do some writes */
	int fd = open(argv[1], O_RDWR);
	struct filsys_fat32 dosfs;
	init_struct_fat32(argv[1], &dosfs);
	for(int i = 0; i < 100000; i++){
		cyclic_write_fat32(&dosfs, fd, &i, sizeof(i));
	}
	
	recover_fat32(argv[1]);

	/* check if contents still exist */
	return 0;
}
